/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package resource;

import bean.Banner;
import java.util.List;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.springframework.beans.factory.annotation.Autowired;
import service.BannerService;

/**
 *
 * @author root
 */
@Path("banner")
public class BannerResource {
    
    @Autowired
    private BannerService bannerService;
            
    @GET
    @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
    public List<Banner> getAllBanner(){
        return bannerService.getAllBanner();
    }
}
